package web_model

import (
	"time"

	"gorm.io/gorm"
)

const TableNameTransRoute = "trans_route"

// TransRoute mapped from table <trans_route>
type TransRoute struct {
	ID          int64          `gorm:"column:id;type:INTEGER;primaryKey" json:"id"`
	Name        string         `gorm:"column:name;type:TEXT" json:"name"`
	Code        string         `gorm:"column:code;type:TEXT" json:"code"`
	CarrierID   int64          `gorm:"column:carrier_id;type:INTEGER" json:"carrier_id"`
	CarrierName string         `gorm:"column:carrier_name;type:TEXT" json:"carrier_name"`
	CarID       int64          `gorm:"column:car_id;type:INTEGER" json:"car_id"`
	CarSn       string         `gorm:"column:car_sn;type:TEXT" json:"car_sn"`
	DriverID    int64          `gorm:"column:driver_id;type:INTEGER" json:"driver_id"`
	DriverName  string         `gorm:"column:driver_name;type:TEXT" json:"driver_name"`
	Status      string         `gorm:"column:status;type:char" json:"status"`
	CreatedAt   time.Time      `gorm:"column:created_at;type:DATETIME" json:"created_at"`
	UpdatedAt   time.Time      `gorm:"column:updated_at;type:DATETIME" json:"updated_at"`
	DeletedAt   gorm.DeletedAt `gorm:"column:deleted_at;type:DATETIME" json:"deleted_at"`
	CreatedBy   string         `gorm:"column:created_by;type:TEXT" json:"created_by"`
	UpdatedBy   string         `gorm:"column:updated_by;type:text" json:"updated_by"`
}

// TableName TransRoute's table name
func (*TransRoute) TableName() string {
	return TableNameTransRoute
}
